#pragma once
#include "VRRWidget.h"
#include "VTTFFont.h"

class VText :
    public VRRWidget
{
public:
    VText(void);
    VText(const std::string& text, VTTFFont* font = NULL);
    ~VText(void);

public:
    virtual bool render() const;
    virtual bool genTexture();
    virtual void setText(const std::string& text);
    virtual void setFont(VTTFFont* font);

    virtual const std::string& text() const;
    virtual VTTFFont* font() const;
    virtual GLuint getTexture() const;


public: // static font
    static void createStaticFont(void);

protected:
    static VTTFFont* s_font;

public:
    VTTFFont* _font;
    std::string _text;
    GLuint _texture;
    unsigned char _r, _g, _b;
};
